/**
 * ZHU framework. Copyright 2012-, all rights reserved.
 *
 * $Id$
 * $Revision$
 * $Date$
 * $Author$
 */
package daily.service;

import java.io.*;

/**
 * <p>
 * </p>
 * 
 * @author $Author$
 * @version $Revision$ - $Date$
 */
public class TimeRange implements Serializable {

	private static final long serialVersionUID = 1L;
	private static final TimeRange DEFAULT = new TimeRange();
	private String startTime = "08:30";
	private String endTime = "17:30";

	private TimeRange() {

	}

	private TimeRange(final String startTime, final String endTime) {
		if (startTime != null) {
			this.startTime = startTime;
		}
		if (endTime != null) {
			this.endTime = endTime;
		}
	}

	public static TimeRange valueOf(final String startTime, final String endTime) {
		if (startTime != null || endTime != null) {
			return new TimeRange(startTime, endTime);
		}
		return DEFAULT;
	}

	public String getStartTime() {
		return startTime;
	}

	public String getEndTime() {
		return endTime;
	}

}
